package com.smallrig.mall.template.huawei;

public class 核酸检测人员安排 {

    static int n=2;
    static int v=2;
    static int[] nums = new int[]{200,1000};
    public static void main(String[] args) {
        System.out.println(solve());
    }


    public static int solve(){
        //dp[i][j]表示前i个采样员配备了j个志愿者后的采样效率
        int[][] dp = new int[n+1][v+1];

        int cnt = 0;
        for(int i=1;i<=n;i++){
            cnt += nums[i-1] - 2*nums[i-1]/10;
            dp[i][0] = cnt;
        }

        for(int i=1;i<=n;i++){
            for(int j=1;j<=v;j++){
                //不配备志愿者，效率下降10%
                //1个志愿者，100%效率
                dp[i][j] = Math.max(dp[i-1][j-1]+nums[i-1],dp[i-1][j]+nums[i-1]-2*nums[i-1]/10);

                //2个志愿者，110%
                dp[i][j] = Math.max(dp[i][j],j-2>=0?dp[i-1][j-2]+nums[i-1]+nums[i-1]/10:0);
                //3个志愿者，120%
                dp[i][j] = Math.max(dp[i][j],j-3>=0?dp[i-1][j-3]+nums[i-1]+2*nums[i-1]/10:0);
                //>=4个志愿者，130%
                dp[i][j] = Math.max(dp[i][j],j-4>=0?dp[i-1][j-4]+nums[i-1]+3*nums[i-1]/10:0);
            }
        }
        return dp[n][v];
    }
}
